#include <catch2/catch.hpp>

#include "solution.hpp"

using namespace solution_046;

TEST_CASE("046_permutation", "[046]") {
    CHECK(Solution().permute({1,2,3})           == Solution().permuteSTL({1,2,3}));
    CHECK(Solution().permute({0,1})             == Solution().permuteSTL({0,1}));
    CHECK(Solution().permute({1})               == Solution().permuteSTL({1}));
    CHECK(Solution().permute({1,4,2,3,5})       == Solution().permuteSTL({1,4,2,3,5}));
    CHECK(Solution().permute({1,6,4,5,3,2})     == Solution().permuteSTL({1,6,4,5,3,2}));
    CHECK(Solution().permute({6,4,1,5,3,2,2,0}) == Solution().permuteSTL({6,4,1,5,3,2,2,0}));
    CHECK(Solution().permute({1,5,1})           == Solution().permuteSTL({1,5,1}));
}
